
Page({

  data: {
    marginTop:"",
    loadingShow:true,
  },


  onLoad: function (options) {

    wx.getSystemInfo({
      success: (result) => {
        let screenHeight = result.screenHeight
        let marginTop = Math.round((screenHeight - 260) / 2)
        this.setData({marginTop : marginTop + "px"})
      },
    })
    let app = getApp()
    if (app.globalData.checkReady){
      setTimeout(() => {
        wx.switchTab({
          url: '/pages/home/home',
        })
      }, 900)
    }else{
      app.userLoginReadyCallback = res => {
        setTimeout(() => {
          wx.switchTab({
            url: '/pages/home/home',
          })
        }, 900)
      }
    }
  },
  onReady: function () {

  },

  onShow: function () {

  },
  onHide: function () {

  },

  
  onUnload: function () {

  },
  onPullDownRefresh: function () {

  },
  onReachBottom: function () {

  },

  onShareAppMessage: function () {

  }
})